<!--
 * @FilePath     : /study_code/vue2.x/transition-element_component3.html
 * @Description  :
 * @Date         : 2025-05-03 07:56:39
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-05-03 07:56:49
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <style>
      .v-enter {
        color: red;
      }

      .v-enter-active {
        color: blue;
      }

      /* 停留时间较长 */
      .v-enter-to {
        color: pink;
      }

      .v-leave {
        color: green;
      }

      .v-leave-active {
        color: orange;
      }

      /* 停留时间较长 */
      .v-leave-to {
        color: yellow;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <button v-on:click="show = !show">Toggle</button>
      <!-- 内置组件 -->
      <transition :duration="4000">
        <p v-if="show">hello</p>
      </transition>
    </div>

    <script src="/vue/dist/vue.min.js"></script>
    <script src="./common.js"></script>
    <script>
      // 自定义组件
      const myComponent = {
        data: function () {
          return {}
        },
        props: [],
        template: ``,
        methods: {},
      }

      var app = new Vue({
        el: '#app',
        data: function () {
          return {
            show: true,
          }
        },
      })
    </script>
  </body>
</html>
